package com.maiji.cloud.entities.shopingmall;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Date;
import java.util.List;

/**
 *  资金流水表
 */
@NoArgsConstructor
@Data
@Accessors(chain = true)
@Table(name = "capital_main_log")
public class CapitalMainLog {

	@TableId
	@Column(name = "uu_id", type = MySqlTypeConstant.VARCHAR, length = 50, isKey = true)
	private String uuId;
	
	@Column(name = "user_id", type = MySqlTypeConstant.VARCHAR, length = 50)
	private String userId;

    @Column(name = "capital_type", type = MySqlTypeConstant.INT, length = 2)
    private Integer capitalType; // 1-余额：订单返现，2-减肥基金，3-积分，4-余额：分销提成
	
	@Column(name = "change_quantity", type = MySqlTypeConstant.DOUBLE, length = 8, decimalLength = 2)
	private Double changeQuantity; // 资金变动数量

    @Column(name = "change_type", type = MySqlTypeConstant.INT, length = 2, defaultValue = "0")
    private Integer changeType; // 1-资金增加，2-资金减少

    @Column(name = "change_date", type = MySqlTypeConstant.DATETIME)
    private Date changeDate; // 资金变动时间

    @Column(name = "remark", type = MySqlTypeConstant.INT, length = 11)
    private Integer remark; // 资金变动备注说明（订单编号等）
	
    @Column(name = "relevant_id", type = MySqlTypeConstant.VARCHAR, length = 50)
    private String relevantId; // 关联详情id

    @TableField(exist = false)
    private String remarkStr; // 资金变动备注说明

    @TableField(exist = false)
    private List<Date> changeDates;
    
}
